Motion ghost resistant hdr image generation method and portable terminal

ABSTRACT

The present invention provides a motion ghost resistant HDR image generation method and a portable terminal. A normally exposed image and an underexposed image are mapped to an overexposed image and are fused in the overexposed image, such that the values of the underexposed image are more considered to be used in the fused image in a bright place and the values of the overexposed image are more considered to be used in a dark place; therefore, both the dark place and bright place have abundant information and a motion ghost resistant HDR image is finally generated, thus improving the visual effect of a ghost-removed high-dynamic range image.

FIELD OF THE INVENTION

The present invention relates to the field of image processing, and particularly relates to a motion ghost resistant HDR method and a portable terminal.

BACKGROUND OF THE INVENTION

A single exposure of modern digital cameras cannot cover the entire dynamic range of a natural scene. Traditional high dynamic range images cannot contain all the details in the overexposed and underexposed areas. High dynamic range images expand the covered dynamic range of a single image and to enhance image details by fusing a series of low dynamic range images with different exposures. High dynamic range technology and its good visual experience have been gradually applied to the fields of film and television special effects and other fields, which have very important theoretical research value and broad business foundation.

The existing fusion technology ensures that a fused image without ghosting can be obtained, and generally requires that the background of the images to be fused with different exposures are completely static. However, most of the images obtained in real scenes contain dynamic elements such as moving objects, which will lead to ghosting in the high dynamic range image obtained after fusion. The existing de-ghosting techniques usually directly removes all moving objects contained in the images to be fused in the fusion result, which to a certain extent makes the obtained high dynamic range image lose the authenticity of the original image.

Technical Problem

The present invention provides a motion ghost resistant HDR method, a computer-readable storage medium and a portable terminal, which aim to solve the problem that the current high dynamic range image contains motion ghosting, thus improving the visual effect of a ghost-removed HDR image.

Technical Solutions

According to a first aspect, the present invention provides a motion ghost resistant HDR method, comprising steps of:

acquiring a normally exposed image I₁, an underexposed image I₂ and an overexposed image I₃ shot continuously;

mapping and adjusting the brightness of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃ respectively, to obtain a first image I₁₂ and a second image I₁₃;

comparing both the underexposed image I₂ and the overexposed image I₃ with the first image I₁₂ and the second image I₁₃, respectively, and correcting pixels having great brightness differences in the underexposed image I₂ and the overexposed image I₃ to obtain a third image I₂′ and a fourth image I₃′ of which motion pixels are removed;

calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively;

using the brightness of the fourth image I₃′ as a reference, respectively adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′; and

fusing the fifth image I₁″, the sixth image I₂″, and the fourth image I₃′ with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃ respectively, to generate a motion ghost resistant HDR image.

Optionally, the normally exposed image I₁, the underexposed image I₂ and the overexposed image I₃ are three images taken in HDR mode.

Optionally, the step of mapping and adjusting, is to use histogram mapping to map and adjust the histogram of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃, to obtain the first image I₁₂ and the second image I₁₃ after brightness adjustment.

Optionally, the step can specifically be:

comparing, pixel by pixel, both the underexposed image I₂ and the overexposed image Is respectively with the first image I₁₂ and the second image I₁₃ after corresponding brightness adjustment of the normally exposed image I₁; and correcting motion pixels in the underexposed image I₂ and the overexposed image I₃ to obtain the third image I₂′ and the fourth image I₃′ of which motion pixels are removed;

optionally, comparing the underexposed image I₂ with the first image I₁₂ pixel by pixel and correcting motion pixels to obtain the third image I₂′, specifically by formulas: V₃=V₁(1−W)+V₂ W, W=min(1,3.0/|V₁-V₂|), where, V₁ is the brightness of the pixels at a certain position in the underexposed image I₂, V₂ is the brightness of the pixels at a corresponding position in the first image I₁₂, and V₃ is the brightness of the pixels at a corresponding position in the third image I₂′;

optionally, comparing the overexposed image I₃ with the second image I₁₃ pixel by pixel and correcting motion pixels to obtain the fourth image I₃′, specifically by formulas: V₃′=V₁″(1−W′)+V₂′W′, W′=min(1,3.0/|V₁′−V₂′|), where, V₁′ is the brightness of the pixels at a certain position in the overexposed image I₃, V₂′ is the brightness of the pixels at a corresponding position in the second image I₃, and V₃′ is the brightness of the pixels at a corresponding position in the fourth image I₃′.

Optionally, calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃, specifically by formulas:

w ₁=127.5−|127.5−I ₁|+1;

w ₂ =I ₂′+1

w ₃=255−I ₃+1.

Optionally, the step of respectively adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ specifically can be:

calculating the pixels of the fifth image I₁″ by the formula y=a₁x^(b) ¹ , where x is the brightness of the pixels in the normally exposed image I₁, y is the brightness of the pixels in the fifth image I₁″, and a₁ and b₁ are coefficients, both of which are calculated natural number;

calculating the pixels of the sixth image I₂″ by the formula y′=a₂x′^(b) ² , where x′ is the brightness of the pixels in the third image I₂′, y′ is the brightness of the pixels in the sixth image I₂″, and a₂ and b₂ are coefficients, both of which are calculated natural number.

Optionally, a weighted fusion, specifically:

uses the formula I=w ₁ I ₁ ″+w ₂ I ₂ ″+w ₃ I ₃′

to fuse pixels in the image, where I is an HDR image.

According to a second aspect, the present invention provides a computer-readable medium when computer programs being executed by one or more processors, cause the one or more processors to perform the above-mentioned steps of the motion ghost resistant HDR method.

According to a third aspect, the present invention provides a portable terminal, comprising:

one or more processors;

a memory; and

one or more computer programs where the one or more computer programs are stored in the memory and are configured to be executed by the one or more processors, and when being executed by the one or more processors, cause the one or more processors to perform the above-mentioned steps of the motion ghost resistant HDR method.

Advantages

In the present invention, motion pixels are removed, and a normally exposed image and an underexposed image are mapped to an overexposed image and are fused in the overexposed image, such that the values of the underexposed image are more considered to be used in the fused image in a bright place and the values of the overexposed image are more considered to be used in a dark place; therefore, both the dark place and bright place have abundant information and a motion ghost resistant HDR image is finally generated, thus improving the visual effect of a ghost-removed high-dynamic range image.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart of a motion ghost resistant HDR method in accordance with a first embodiment of the present invention; and

FIG. 2 is a schematic structural diagram of a portable terminal in accordance with a third embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The foregoing objects, technical solutions and advantages of the invention will be much clearer from the following detail description taken with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

In order to explain the technical solutions of the present invention, the following will be described by specific embodiments.

First Embodiment

Referring to FIG. 1, a motion ghost resistant HDR (High-Dynamic Range) method provided in the first embodiment of the present invention, comprises the following steps:

S101, acquiring a normally exposed image (I₁), an underexposed image (I₂) and an overexposed image (I₃) shot continuously;

wherein the normally exposed image (I₁), the underexposed image (I₂) and the overexposed image (I₃) are three images taken in HDR mode.

S102, mapping and adjusting the brightness of the normally exposed image (I₁) to be consistent with the brightness of the underexposed image (I₂) and the overexposed image (I₃) respectively, to obtain a first image (I₁₂) and a second image (I₁₃);

wherein mapping and adjusting, is to use histogram mapping to map and adjust the histogram of the normally exposed image (I₁) to be consistent with the brightness of the underexposed image (I₂) and the overexposed image (I₃), to obtain the first image (I₁₂) and the second image (I₁₃) after brightness adjustment.

S103, comparing both the underexposed image (I₂) and the overexposed image (I₃) with the first image (I₁) and the second image (I₁₃), respectively, and correcting pixels having great brightness differences in the underexposed image (I₂) and the overexposed image (I₃) to obtain a third image (I₂) and a fourth image (I₃) of which motion pixels are removed;

wherein motion pixels refer to pixels with obvious brightness differences in corresponding positions in two comparative images; comparing, pixel by pixel, the underexposed image (I₂) and the overexposed image (I₃) respectively with the first image (I₁₂) and the second image (I₁₃) after corresponding brightness adjustment of the normally exposed image (I₁); and correcting motion pixels in the underexposed image (I₂) and the overexposed image (I₃) to obtain the third image (I₂′) and the fourth image (I₃′) of which motion pixels are removed;

comparing the underexposed image (I₂) with the first image (I₁₂) pixel by pixel and correcting motion pixels to obtain the third image (I₂′), specifically by formulas:

V ₃ =V ₁(1−W)+V ₂ W

W=min(1,3.0/|V ₁-V ₂|)

where, (V₁) is the brightness of the pixels at a certain position in the underexposed image (I₂), if the brightness value is greater than 240, it will remain unchanged; (V₂) is the brightness of the pixels at a corresponding position in the first image (I₁₂), and (V₃) is the brightness of the pixels at a corresponding position in the third image (I₂′).

Comparing the overexposed image (I₃) with the second image (I₁₃) pixel by pixel and correcting motion pixels to obtain the fourth image (I₃′), specifically by formulas:

V ₃ ′=V ₁′(1−W′)+V ₂ ′W′

W′=min(1,3.0/|V ₁′-V ₂′)

where (V₁′) is the brightness of the pixels at a certain position in the overexposed image (I₃), (V₂′) is the brightness of the pixels at a corresponding position in the second image (I₁₃), and (V₃′) is the brightness of the pixels at a corresponding position in the fourth image (I₃′).

S104, calculating a first weight map (w₁), a second weight map (w₂) and a third weight map (w₃) of the normally exposed image (I₁), the third image (I₂′), and the fourth image (I₃′), respectively;

where calculating the first weight map (w₁), the second weight map (w₂) and the third weight map (w₃), by formulas:

w ₁=127.5−|127.5−I ₁|+1;

w ₂ =I ₂′+1

w ₃=255−I ₃′+1.

S105, using the brightness of the fourth image (I₃′) as a reference, respectively adjusting the brightness of the normally exposed images (I₁) and the third image (I₂′) to obtain a fifth image (I₁″) and a sixth image (I₂″) that are highly exposed and have a consistent brightness to the fourth image (I₃′);

calculating the pixels of the fifth image (I₁″) by the formula y=a₁x^(b) ¹ , where x is the brightness of the pixels in the normally exposed image (I), y is the brightness of the pixels in the fifth image (I₁″), and a₁ and b₁ are coefficients, both of which are calculated natural number;

taking the logarithm of both sides of the formula y=a₁x^(b) ¹ to get:

ln(y)=ln(a ₁)+b ₁ln(x)

inputting N pixels to obtain N equations above, calculating the above formula by the least square method to obtain ln(a₁), b₁, and then obtaining the estimated values of a₁ and b₁;

then, using the estimated values of a₁ and b₁ in the previous step as initial values, optimizing a₁ and b₁ using the Gauss-Newton method, and denoting the error as e=a₁x^(b) ¹ −y; for N pixels, there are N error equations:

e _(i) =a ₁ x _(i) ^(b) ¹ −y _(i) ,i=1,2 . . . N

the total error:

f=Σe _(i) ²

using Gauss-Newton method, the above estimated parameter a₁ and b₁ can be optimized to obtain the definite values of a₁ and b₁;

calculating the pixels of the sixth image (I₂″) by the formula y′=a₂x′^(b) ² , where x′ is the brightness of the pixels in the third image (I₂′), y′ is the brightness of the pixels in the sixth image (I₂″), and a₂ and b₂ are coefficients, both of which are calculated natural number;

taking the logarithm of both sides of the formula y′=a₂x′^(b) ² to get:

ln(y′)=ln(a ₂)+b ₂ln(x′)

inputting N pixels to obtain N equations above, calculating the above formula by the least square method to obtain ln(a₂), b₂, and then obtaining the estimated values of a₂ and b₂;

then, using the estimated values of a₂ and b₂ in the previous step as initial values, optimizing a₂ and b₂ using the Gauss-Newton method, and denoting the error as e′=a₂x′^(b) ² −y′; for N pixels, there are N error equations:

e _(i) ′=a ₂ x′ _(i) ^(b) ² −y′ _(i) ,i=1,2 . . . N

the total error:

f=Σe′ _(i) ²

using Gauss-Newton method, the above estimated parameter a₂ and b₂ can be optimized to obtain the definite values of a₂ and b₂.

S106, fusing the fifth image (I₁″), the sixth image (I₂″), and the fourth image (I₃′) with the corresponding first weight map (w₁), the second weight map (w₂), and the third weight map (w₃) respectively, to generate a motion ghost resistant HDR image.

Fusing the images, specifically by the formula:

I=w ₁ I ₁ ″+w ₂ I ₂ ″+w ₃ I ₃′

where I is an HDR image, and finally obtaining a motion ghost resistant HDR image I.

In the present invention, for a normally exposed image, the closer the brightness is to the intermediate value, the greater the weight map; for an underexposed image, the higher the brightness, the greater the weight map; for an overexposed image, the lower the brightness, the greater the weight map. Therefore, the values of the underexposed image are more considered to be used in the fused image in a bright place and the values of the overexposed image are more considered to be used in a dark place; such that both the dark place and bright place have abundant information.

Second Embodiment

The second embodiment of the present invention provides a computer-readable storage medium, the one or more computer programs can be executed by one or more processors to perform the steps of the motion ghost resistant HDR method provided in the first embodiment.

Third Embodiment

FIG. 2 illustrates a structural block diagram of a portable terminal provided in the third embodiment of the present invention. A portable terminal 100 comprises: one or more processors 101, a memory 102, and one or more computer programs, where the one or more processors 101 and the memory 102 are connected by a bus, the one or more computer programs are stored in the memory 102, and are configured to be executed by the one or more processors 101. The one or more processors 101 execute the one or more computer programs to perform the steps of the motion ghost resistant HDR method provided in the first embodiment.

A person of ordinary skill in the art may understand that all or part of the steps in the method of the above-mentioned embodiments can be implemented by a program or programs instructing relevant hardware. The program or programs can be stored in a computer-readable storage medium, and the storage media can be, such as ROM/RAM, magnetic disk, optical disk, etc.

The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacements and improvement made within the spirit and principle of the present invention shall be included in the protection of the present invention. 

1: A motion ghost resistant HDR image generation method, wherein comprising steps of: acquiring a normally exposed image I₁, an underexposed image I₂ and an overexposed image I₃ shot continuously; mapping and adjusting the brightness of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃ respectively, to obtain a first image I₁₂ and a second image I₁₃; comparing both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃, and correcting pixels having great brightness differences in the underexposed image I₂ and the overexposed image I₃ to obtain a third image I₂′ and a fourth image I₃′ of which motion pixels are removed; calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively; using the brightness of the fourth image I₃′ as a reference, respectively adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′; and fusing the fifth image I₁″, the sixth image I₂″, and the fourth image I₃′ respectively with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃, to generate a motion ghost resistant HDR image. 2: The method of claim 1, wherein the normally exposed image I₁, the underexposed image I₂ and the overexposed image I₃ are three images taken in HDR mode. 3: The method of claim 1, wherein the step of mapping and adjusting, is to use histogram mapping to map and adjust the histogram of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃, to obtain the first image I₁₂ and the second image I₁₃ after brightness adjustment. 4: The method of claim 1, wherein the step of comparing both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃, specifically comprises: comparing, pixel by pixel, both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃ which are obtained after correspondingly adjusting the brightness of the normally exposed image I₁; and correcting motion pixels in the underexposed image I₂ and the overexposed image I₃ to obtain the third image I₂′ and the fourth image I₃′ of which motion pixels are removed. 5: The method of claim 4, wherein the step of comparing the underexposed image I₂ with the first image I₁₂ pixel by pixel and correcting motion pixels to obtain the third image I₂′, specifically uses the following formulas: V₃=V₁ (1−W)+V₂W, W=min(1,3.0/|V₁−V₂|), where, V₁ is the brightness of the pixels at a certain position in the underexposed image I₂, V₂ is the brightness of the pixels at a corresponding position of the certain position in the first image I₁₂, and V₃ is the brightness of the pixels at a corresponding position of the certain position in the third image I₂′. 6: The method of claim 4, wherein the step of comparing the overexposed image I₃ with the second image I₁₃ pixel by pixel and correcting motion pixels to obtain the fourth image I₃′, specifically uses the following formulas: V₃′=V₁′(1−W)+V₂′W′, W′=min(1,3.0/|V₁′-V₂′|), where, V₁′ is the brightness of the pixels at a certain position in the overexposed image I₃, V₂′ is the brightness of the pixels at a corresponding position of the certain position in the second image I₁₃, and V₃′ is the brightness of the pixels at a corresponding position of the certain position in the fourth image I₃′. 7: The method of claim 1, wherein the step of calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively, specifically uses the following formulas: w ₁=127.5−|127.5−I ₁|+1; w ₂ =I ₂′+1 w ₃=255−I ₃′+1. 8: The method of claim 1, wherein the step of adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′, specifically comprises: calculating the pixels of the fifth image I₁″ by the formula y=a₁x^(b) ¹ , where x is the brightness of the pixels in the normally exposed image I₁, y is the brightness of the pixels in the fifth image I₁″, and a₁ and b₁ are coefficients, both of which are calculated natural number; and calculating the pixels of the sixth image I₂″ by the formula y′=a₂x′^(b) ² , where x′ is the brightness of the pixels in the third image I₂′, y′ is the brightness of the pixels in the sixth image I₂″, and a₂ and b₂ are coefficients, both of which are calculated natural number. 9: The method of claim 1, wherein the step of fusing the fifth image I₁″, the sixth image I₂″, and the fourth image I₃′ respectively with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃, to generate a motion ghost resistant HDR image, specifically comprises: using the following formula: I=w ₁ I ₁ ″+w ₂ I ₂ ″+w ₃ I ₃′ to fuse the pixels in the images, where I is an HDR image. 10: A non-transitory computer-readable storage medium that stores one or more computer programs including a set of computer-executable instructions, wherein one or more processors execute the set of computer-executable instructions to perform steps of a motion ghost resistant HDR image generation method comprising: acquiring a normally exposed image I₁, an underexposed image I₂ and an overexposed image I₃ shot continuously; mapping and adjusting the brightness of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃ respectively, to obtain a first image I₁₂ and a second image I₁₃; comparing both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃, and correcting pixels having great brightness differences in the underexposed image I₂ and the overexposed image I₃ to obtain a third image I₂′ and a fourth image I₃′ of which motion pixels are removed; calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively; using the brightness of the fourth image I₃′ as a reference, respectively adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′; and fusing the fifth image I₁″ the sixth image I₂″, and the fourth image I₃′ respectively with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃, to generate a motion ghost resistant HDR image. 11: A portable terminal, comprising: one or more processors; a memory; and one or more computer programs, where the one or more computer programs including a set of computer-executable instructions are stored in the memory and are configured to be executed by the one or more processors, wherein when being executed by the one or more processors, cause the one or more processors to perform steps of a motion ghost resistant HDR image generation method comprising: acquiring a normally exposed image I₁, an underexposed image I₂ and an overexposed image I₃ shot continuously; mapping and adjusting the brightness of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃ respectively, to obtain a first image I₁₂ and a second image I₁₃; comparing both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃, and correcting pixels having great brightness differences in the underexposed image I₂ and the overexposed image I₃ to obtain a third image I₂′ and a fourth image I₃′ of which motion pixels are removed; calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively; using the brightness of the fourth image I₃′ as a reference, respectively adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′; and fusing the fifth image I₁″, the sixth image I₂″, and the fourth image I₃′ respectively with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃, to generate a motion ghost resistant HDR image. 12: The portable terminal of claim 11, wherein the step of mapping and adjusting, is to use histogram mapping to map and adjust the histogram of the normally exposed image I₁ to be consistent with the brightness of the underexposed image I₂ and the overexposed image I₃, to obtain the first image I₁₂ and the second image I₁₃ after brightness adjustment. 13: The portable terminal of claim 11, wherein the step of comparing both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃, specifically comprises: comparing, pixel by pixel, both the underexposed image I₂ and the overexposed image I₃ respectively with the first image I₁₂ and the second image I₁₃ which are obtained after correspondingly adjusting the brightness of the normally exposed image I₁; and correcting motion pixels in the underexposed image I₂ and the overexposed image I₃ to obtain the third image I₂′ and the fourth image I₃′ of which motion pixels are removed. 14: The portable terminal of claim 13, wherein the step of comparing the underexposed image I₂ with the first image I₁₂ pixel by pixel and correcting motion pixels to obtain the third image I₂′, specifically uses the following formulas: V₃=V₁(1−W)+V₂W, W=min(1,3.0/|V₁-V₂), where, V₁ is the brightness of the pixels at a certain position in the underexposed image I₂, V₂ is the brightness of the pixels at a corresponding position of the certain position in the first image I₁₂, and V₃ is the brightness of the pixels at a corresponding position of the certain position in the third image I₂′. 15: The portable terminal of claim 13, wherein the step of comparing the overexposed image I₃ with the second image I₁₃ pixel by pixel and correcting motion pixels to obtain the fourth image I₃′, specifically uses the following formulas: V₃′=V₁′(1−W′)+V₂′W′, W′=min(1,3.0/|V₁′-V₂′|), where, V₁′ is the brightness of the pixels at a certain position in the overexposed image I₃, V₂′ is the brightness of the pixels at a corresponding position of the certain position in the second image I₁₃, and V₃′ is the brightness of the pixels at a corresponding position of the certain position in the fourth image I₃′. 16: The portable terminal of claim 11, wherein the step of calculating a first weight map w₁, a second weight map w₂ and a third weight map w₃ of the normally exposed image I₁, the third image I₂′, and the fourth image I₃′, respectively, specifically uses the following formulas: w ₁=127.5−|127.5−I ₁|+1; w ₂ =I ₂′+1; w ₃=255−I ₃′+1. 17: The portable terminal of claim 11, wherein the step of adjusting the brightness of the normally exposed images I₁ and the third image I₂′ to obtain a fifth image I₁″ and a sixth image I₂″ that are highly exposed and have a consistent brightness to the fourth image I₃′, specifically comprises: calculating the pixels of the fifth image I₁″ by the formula y=a₁x^(b) ¹ , where x is the brightness of the pixels in the normally exposed image I₁, y is the brightness of the pixels in the fifth image I₁″, and a₁ and b₁ are coefficients, both of which are calculated natural number; and calculating the pixels of the sixth image I₂″ by the formula y′=a₂x′^(b) ² , where x′ is the brightness of the pixels in the third image I₂′, y′ is the brightness of the pixels in the sixth image I₂″, and a₂ and b₂ are coefficients, both of which are calculated natural number. 18: The portable terminal of claim 11, wherein the step of fusing the fifth image I₁″, the sixth image I₂″, and the fourth image I₃′ respectively with the corresponding first weight map w₁, the second weight map w₂, and the third weight map w₃, to generate a motion ghost resistant HDR image, specifically comprises: uses the following formula: I=w ₁ I ₁ ″+w ₂ I ₂ ″+w ₃ I ₃′ to fuse the pixels in the images, where I is an HDR image. 